package gdkjxy.jsj.Test;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import gdkjxu.jsj.Po.Account;
import gdkjxy.jsj.Dao.AccountDao;

public class TransactionTest {
@Test
public void xmlTest() {
	ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
	AccountDao accountDao=(AccountDao) applicationContext.getBean("AccountDao");
	accountDao.transfer("jack", "tom", 100.0);
}
@Test
public void annotionTest() {
	ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext-annocation.xml");
	AccountDao accountDao=(AccountDao) applicationContext.getBean("AccountDao");
	accountDao.transfer("jack", "tom", 100.0);
}
}
